package com.jijuxie.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jijuxie.system.domain.SysMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 根据用户ID查询菜单
     */
    List<SysMenu> selectMenusByUserId(@Param("userId") Long userId);

    /**
     * 根据角色ID查询菜单
     */
    List<SysMenu> selectMenusByRoleId(@Param("roleId") Long roleId);

    /**
     * 根据父ID查询菜单
     */
    List<SysMenu> selectMenusByParentId(@Param("parentId") Long parentId);
}
